<script setup lang="ts">
import { PropType } from 'vue'
// import type { placestartType } from '@/api/table/types'
import { Descriptions } from '@/components/Descriptions'
// import { useI18n } from '@/hooks/web/useI18n'
// import { ElTag } from 'element-plus'
import { DescriptionsSchema } from '@/types/descriptions'
import { placestartType } from '@/api/common/types'
// const { t } = useI18n()

defineProps({
  currentRow: {
    type: Object as PropType<Nullable<placestartType>>,
    default: () => null
  },
  detailSchema: {
    type: Array as PropType<DescriptionsSchema[]>,
    default: () => []
  }
})
</script>

<template>
  <Descriptions :schema="detailSchema" :data="currentRow || {}">
    <template #importance="{}: { row: placestartType }">
      <!-- <ElTag :type="row.importance === 1 ? 'success' : row.importance === 2 ? 'warning' : 'danger'">
        {{
          row.importance === 1
            ? t('tableDemo.important')
            : row.importance === 2
            ? t('tableDemo.good')
            : t('tableDemo.commonly')
        }}
      </ElTag> -->
    </template>
    <!-- 
    <template #content="{ row }: { row: placestartType }">
      <div v-html="row.content"></div>
    </template> -->
  </Descriptions>
</template>
